//
//  IssueTypeView.m
//  TQY
//
//  Created by 甘世清 on 2024/9/29.
//

#import "IssueTypeView.h"

@implementation IssueTypeView

- (void)SQ_UIViewForSelfView{
    self.bgView =  [[UIView alloc]init];
    self.bgView.backgroundColor = UIColor.whiteColor;
    self.bgView.layer.cornerRadius = 8;
    self.bgView.layer.masksToBounds = YES;
    [self addSubview:self.bgView];
    [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.centerY.equalTo(self);
            make.width.mas_equalTo(SCREEN_WIDETH- 32);
            make.top.bottom.equalTo(self);
    }];
    self.label = [[UILabel alloc]init];
    self.label.text = SQNSLocalString(@"详细描述");
    self.label.font = FONT_MEDIUM(14);
    self.label.textColor = SQColor333333;
    [self.bgView addSubview:self.label];
    [self.label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.bgView);
            make.left.equalTo(self.bgView).offset(16);
    }];
    self.rightLabel = [[UILabel alloc]init];
    self.rightLabel.textColor = SQColor999999;
    self.rightLabel.textAlignment = NSTextAlignmentRight;
    self.rightLabel.font = FONT_MEDIUM(12);
    [self.bgView addSubview:self.rightLabel];
    [self.rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.bgView);
            make.right.equalTo(self.bgView.mas_right).offset(-16);
            make.left.equalTo(self.bgView).offset(100);
    }];
    
   
    
    self.btn =  [UIButton buttonWithType:UIButtonTypeCustom];
    self.btn.backgroundColor = UIColor.clearColor;
    [self.bgView addSubview:self.btn];
    [self.btn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self.bgView);
    }];
    
  
    
}
- (void)setName:(NSString *)name{
    self.label.text = name;
}
- (void)setRightName:(NSString *)rightName{
    _rightName = rightName;
    self.rightLabel.text = rightName;
    if ([rightName isNotEmpty]) {
        self.rightLabel.textColor = SQColor3DA59D;
    } else {
        self.rightLabel.textColor = SQColor999999;
    }
  
   
}
 

@end
